package com.huyi.singleton;

/**
 * 线程安全- 双重校验锁
 * 
 * 描述：	
 * @author shengli.hu
 * @since 1.8	
 * @version 1.0
 */
public class SingletonDemo1 {

	private volatile static SingletonDemo1 instance = null;

	public static SingletonDemo1 getInstance() {
		if (instance == null) {
			synchronized (SingletonDemo1.class) {
				if (instance == null) {
					instance = new SingletonDemo1();
				}
			}

		}
		return instance;
	}
}
